<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script>
			function getName(){
				var n=document.forms[0].uname;
				alert(n.value);
			}
		</script>
	</head>
	<body>
		<form>
			<input type="text" placeholder="user name" name="uname"/>
			
			<input type="button" value="show it" onclick="getName()"/>
		</form>
	</body>
</html>
